<template>
  <view class="entry-page">
    <view class="class-task-info">
      <view class="course-info">
        <view class="course-name-num">
          <view class="course-name">
            SRv6
            <view class="edit-icon"></view>
          </view>

          <view class="course-pub-icon"> </view>
        </view>
      </view>
      <view class="task-name"></view>
      <view class="teacher-time">
        <text>SRv6</text>
        <text>最近更新时间</text>
      </view>
    </view>

    <view class="student-list">
      <view class="sort-title">
        <view :class="['sort-item', sort == 'num' ? 'active' : '']"
          >按学号排序</view
        >
        <view :class="['sort-item', sort == 'name' ? 'active' : '']"
          >按姓名排序</view
        >
      </view>

      <view class="entry-list">
        <view class="entry-item">
          <view class="student-name">
            <view>
              <view class="name"></view>
              <view class="set-code"></view>
            </view>
          </view>

          <view class="entry-box">
            <!-- 分数 -->
          </view>

          <view class="entry-remark">
            <view class="unremark entry-remark-item"> 未备注 </view>
            <view class="remark entry-remark-item">
              <view class="remark-icon icon"></view>
              查看
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      sort: "num", // 排序tag
    };
  },
};
</script>

<style lang="scss" scoped>
.entry-page {
  height: 100%;
  padding: 20rpx 30rpx 0;
  background: #f2f4f9;
  overflow-y: scroll;
}
.class-task-info {
  height: 238rpx;
  background: linear-gradient(135deg, #7688ff, #4275fd);
  border-radius: 16rpx;
  padding: 32rpx 24rpx;
  color: #fff;
  margin-bottom: 20rpx;
}

.course-name-num {
  height: 56rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  line-height: 56rpx;

  .edit-icon {
    width: 36rpx;
    height: 36rpx;
    margin-left: 8rpx;
    background: url("@/pages/achievement/static/img/edit-icon1.png") 0 0
      no-repeat;
    background-size: 100% 100%;
  }
}

.course-name-num {
  width: 108rpx;
  height: 102rpx;
  background: #ffffff;
  background: url("@/pages/achievement/static/img/course-publish.jpg") 0 0
    no-repeat;
  background-size: 100% 100%;
}

.task-name {
  width: 100%;
  margin: 8rpx 0 32rpx 0;
  height: 42rpx;
  font-size: 30rpx;
  color: #ffffff;
  line-height: 42rpx;
}
.teacher-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36rpx;
  opacity: 0.7;
  font-size: 26rpx;
  color: #ffffff;
  line-height: 36rpx;
}

.student-list {
  background: #ffffff;
  border-radius: 16rpx;
}
.sort-title {
  height: 88rpx;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 24rpx;

  .sort-item {
    position: relative;
    width: 150rpx;
    height: 88rpx;
    line-height: 88rpx;
    text-align: center;
    color: #333;
    font-size: 30rpx;
  }

  .active {
    color: #4174fd;

    &::after {
      position: absolute;
      left: calc(50% - 15rpx);
      bottom: 8rpx;
      display: block;
      content: " ";
      width: 30rpx;
      height: 6rpx;
      background: #4275fd;
      border-radius: 4rpx;
    }
  }
}
.entry-list {
  .entry-item {
    width: 100%;
    height: 112rpx;
    display: flex;
    justify-content: flex-start;

    .student-name,
    .entry-box,
    .entry-remark {
      width: 230rpx;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .student-name {
      justify-content: flex-start;
      .name {
        height: 42rpx;
        font-size: 30rpx;
        color: #333333;
        line-height: 42rpx;
      }
      .set-code {
        height: 36rpx;
        font-size: 26rpx;
        color: #999999;
        line-height: 136rpx;
      }
    }

    .entry-remark {
      .entry-remark-item {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 148rpx;
        height: 56rpx;
        border-radius: 4rpx;

        .icon {
          width: 36rpx;
          height: 36rpx;
        }
      }
      .unremark {
        color: #d8d8d8;
        background: rgba(153, 153, 153, 0.08);
      }
      .remark {
        background: rgba(255, 137, 72, 0.08);
        color: #ff8948;
        .remark-icon {
          background: url("@/pages/achievement/static/img/info-icon.png") 0 0
            no-repeat;
          background-size: 100% 100%;
        }
      }
    }
  }
}
</style>
